{% load staticfiles %}
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>注册</title>
  <link rel="stylesheet" href="{% static 'css\semantic.css' %}" media="screen" title="no title" charset="utf-8">
  <link rel="stylesheet" href="{% static 'css\login.css' %}" media="screen" title="no title" charset="utf-8">
  <link rel="shortcut icon" type="" href="{% static 'images/python_512px_1118083_easyicon.net.png' %}">

</head>

<body>
  <div class="bg">
    <div class="ui image logo">
      <a href="{% url 'home' %}">
        <img src="{% static 'images/bg-logo.png' %}" alt="" class="ui image" />
      </a>
    </div>
    <div class="ui  two item text  menu">
      <a class="active item">
        <span><p class="outset" style="border-bottom: 2px solid #2185D0;">注册</p>
</span>
</a>
<a class="item" href="{% url 'Login' %}">
  <span><p class="outset" style="border-bottom: 2px solid rgb(247, 250, 252);">登录</p>
</span>
</a>

</div>
<form method="POST" action="{% url 'register'%}">
  {% if form.errors %}
  <div class="ui vertical menu">
    <div class="item">
      <div class="ui transparent input">
        <input name="name" type="name" placeholder="姓名" value="">
      </div>
    </div>
    <div class="item">
      <div class="ui transparent input">
        <input name="email" type="email" placeholder="邮箱" value="">
      </div>
    </div>
    <div class="item">
      <div class="ui transparent input">
        <input name="password" type="password" placeholder="密码（不少于6位）" value="">
      </div>
    </div>
  </div>
  {% csrf_token %}
  <button type="submit" class="ui blue button">注册</button>
  <div class="ui negative message">
    <i class="close icon"></i>
    <div class="header">{{ form.errors }}</div>
  </div>

  {% else %}
  <div class="ui vertical menu">
    <div class="item">
      <div class="ui transparent input">
        <input name="name" type="name" placeholder="姓名" value="">
      </div>
    </div>
    <div class="item">
      <div class="ui transparent input">
        <input name="email" type="email" placeholder="邮箱" value="">
      </div>
    </div>
    <div class="item">
      <div class="ui transparent input">
        <input name="password" type="password" placeholder="密码（不少于6位）" value="">
      </div>
    </div>
  </div>
  {% csrf_token %}
  <button type="submit" class="ui blue button">注册</button> {% endif %}

</form>





</div>
</body>

</html>